package com.cskaoyan.mall.controller.systemmanage;

import com.cskaoyan.mall.bean.vo.ResultVO;
import com.cskaoyan.mall.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Zsp
 * 2021/1/10
 */
@RestController
@RequestMapping("admin/role")
public class RoleController {

    @Autowired
    AdminService adminService;

    @RequestMapping("options")
    public ResultVO options() {
        return ResultVO.ok(adminService.getOptionList());
    }

    @RequestMapping("list")
    public ResultVO getList(Integer page, Integer limit, String sort, String order, String name) {
        return ResultVO.ok(adminService.getRoleList(page, limit, sort, order, name));
    }

    @RequestMapping("permissions")
    public ResultVO permissions(String roleId) {
        return null;
    }
}
